{% extends "Themes/Dabbs/templates/page.twig" %}
{% block head %}
    <title>{{ title }}-{{ coreConfig.name }}</title>
    <meta name="description"
          content="{% if data.description is defined AND data.description %}{{ data.description }}{% else %}{{ subString(data.body,80,true) }}{% endif %}">
    <meta name="keywords" content="{% if keywords is defined %}{{ keywords }}{% else %}{{ title }}{% endif %}">
    <meta name="apple-mobile-web-app-title" content="{{ title }}">
{% endblock %}
{% block body_class %} class="single single-post nav_fixed site-layout-2" node-id="{{ data.id }}"{% endblock %}
{% block body %}
    <div class="content">
        {{ content() }}
        <header class="article-header">
            <h1 class="article-title">
                <a href="{{ url(['for':'node','id':data.id]) }}">{{ data.title }}</a></h1>
            <div class="article-meta">
                <span class="item item-changed">{{ timeTran(data.changed) }}</span>
                <span class="item item-author">发布者：
                    {% if data.uid AND data.user %}
                        <a href="{{ url(['for':'user','id':data.uid]) }}">{{ data.user.name }}</a>
                    {% endif %}
                </span>

                <span class="item item-tags">标签：
                    {% for item in data.tags %}
                        <a rel="tag" href="{{ url(['for':'term','id':item.value,'page':1]) }}">{{ item.term.name }}</a>
                    {% endfor %}
                </span>
                <span class="item item-browse">阅读(<i class="node-browse" node-browse-id="{{ data.id }}">0</i>)</span>
                <span class="item item-comment-num">评论({{ data.comment_num }})</span>
            </div>
        </header>
        <article class="article-content">
            {{ data.body }}
                <div class="download-info">
                    <span>下载地址：</span> {% for key,downloadItem in data.download.ex() %}
                        <a href="{{ downloadItem }}">{{ key }}</a> {% endfor %}
                </div>
        </article>

        <div id="hm_t_114769"></div>
    </div>
    {{ view.r(comment(data)) }}
{% endblock %}

{% block right_box %}
    {{ view.r(['#templates':['right-box','right-box-node','right-box-node-'~data.contentModel,'right-box-node-'~data.id]]) }}
{% endblock %}
{% block bottom %}
    <script src="//cdn.bootcss.com/highlight.js/8.0/highlight.min.js"></script>
    <link href="//cdn.bootcss.com/highlight.js/8.0/styles/monokai_sublime.min.css" rel="stylesheet">
    <script src="//cdn.itdashu.com/themes/dabbs/js/node.js"></script>
    <script>document.write(unescape('%3Cdiv id="hm_t_114769"%3E%3C/div%3E%3Cscript charset="utf-8" src="http://crs.baidu.com/t.js?siteId=1abeb845aac1917457e6ae8b91da4f29&planId=114769&async=0&referer=') + encodeURIComponent(document.referrer) + '&title=' + encodeURIComponent(document.title) + '&rnd=' + (+new Date) + unescape('"%3E%3C/script%3E'));</script>
{% endblock %}
